package com.mingshine.cloud;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

@RestController
public class TestController {


    private static final String INVOKE_URL = "http://spring-cloud-sleuth-provider";

    @Resource
    private RestTemplate restTemplate;

    @GetMapping(value = "/test")
    public String test(){
        String result = restTemplate.getForObject(INVOKE_URL + "/test", String.class);
        return result;
    }

}
